#!/bin/bash

if [ -z $1 ]
then
	echo -e "$0 <options>:\n\t-i\n\t-c\n\t-u"
else
		if [ $1 = "-i" ]
		then
			if [ -z $2 ]
			then
				echo "apk name is null,need a apk name to install!"
			else
				echo "installing... $2"
				adb install $2
			fi
		elif [ $1 = "-c" ]
		then
			echo "check 3rd app's package name."
			adb shell cmd package list packages -3
		elif [ $1 = "-u" ]
		then
			if [ -z $2 ]
			then
				echo "package name is null,need a package name to uninstall!"
			else
				echo "uninstalling... $2"
				adb uninstall $2
			fi
		fi
fi
